import { createApp } from 'vue'
import pinia from './stores'

import { createPinia } from 'pinia'

import App from './App.vue'
import router from './router'
import 'amfe-flexible'
import './assets/reset.css'
import 'vant/lib/index.css';
import { Tabbar, RadioGroup,Dialog  , Radio,TabbarItem,CouponCell, CouponList, Icon ,NavBar,AddressList ,Card,Swipe,Button, SwipeItem,SubmitBar, Checkbox, CheckboxGroup,SwipeCell,AddressEdit} from 'vant';

import '@/assets/icontfont.css'
import { Cascader, Popup, Field, Stepper, Notify } from 'vant'

import { Tab, Tabs } from 'vant'
import { Overlay } from 'vant'
import '@/assets/icontfont.css'
import {  Sidebar, SidebarItem, PullRefresh } from 'vant'
import Header from '@/components/Header/index.vue'
import { VueMasonryPlugin } from 'vue-masonry'

const app = createApp(App)

// 注册公共组件
app.component('Header', Header)

app.use(createPinia())

app.use(router)

app.use(pinia)
app.use(Tabbar).use(Icon)
app.use(Tabbar).use(Icon).use(RadioGroup).use(Radio).use(Dialog)
app.use(Card).use(Button).use(NavBar).use(CouponCell).use(CouponList)
app.use(TabbarItem).use(AddressEdit).use(AddressList)
app.use(Swipe).use(SwipeItem).use(SubmitBar).use(Checkbox).use(CheckboxGroup).use(SwipeCell)
app.use(Tab).use(Tabs).use(Swipe).use(SwipeItem).use(Button).use(Overlay)

app
  .use(Tabbar)
  .use(Icon)
  .use(Sidebar)
  .use(SidebarItem)
  .use(PullRefresh)
  .use(Swipe)
  .use(SwipeItem)
  .use(Cascader)
  .use(Stepper)
  .use(Notify)

app.use(Tab).use(Tabs).use(Popup).use(Field)

app.use(TabbarItem)

app.mount('#app')

app.use(VueMasonryPlugin)
